home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / tcp / ModServer.lha / ModInfo.amirx < prev    next >
Text File  |  1996-11-14  |  1KB  |  68 lines

  1. /* Modinfo by Shades / fake a.k.a. Erik Lindberg 96-11-14 */
  2.  
  3. authorpath='AmiTCP:Clients/AmIRC/rexx/'
  4.  
  5. /* Don't change below unless you know what you're doing */
  6.  
  7. options results
  8.  
  9. if show('P','HIPPOPLAYER') then do
  10.         address 'HIPPOPLAYER'
  11.     GET NAME
  12.     modname=result
  13.  
  14.     GET SIZE
  15.     size=result%1024
  16.  
  17.     address AMIRC.1 'say /me is playing 'd2c(2)modname d2c(2)'size: 'size'K'
  18. end
  19.  
  20. if show('P','DELITRACKER') then do
  21.     address 'DELITRACKER'
  22.     status m nam
  23.     modname=result
  24.  
  25.     status m dir
  26.     creator=result
  27.     creator=delstr(creator,length(creator))
  28.     creator=substr(creator,max(lastpos(':', creator),lastpos('/', creator)) +1)
  29.     
  30.     creator=seekcreator(creator) 
  31.     if creator=='' then
  32.         address AMIRC.1 'say /me is playing 'd2c(2)modname d2c(2)
  33.     else
  34.         address AMIRC.1 'say /me is playing 'd2c(2)modname d2c(2)' by: 'creator
  35. end
  36.  
  37. seekcreator:
  38. parse arg creator
  39. if open('Authors',authorpath'Authornames.txt','R') then do
  40.     seek=0
  41.     DO UNTIL seek==1 | EOF('Authors')
  42.         string=READLN('Authors')
  43.         if find(string,creator) then do
  44.             creator=subword(string, 3)
  45.             seek=1
  46.         end
  47.     end
  48. close('Authors')
  49. end
  50.  
  51. if seek==0 then do
  52.     if open('Groups',authorpath'Groupnames.txt','R') then do
  53.         seek=0
  54.         DO UNTIL seek==1 | EOF('Groups')
  55.             string=READLN('Groups')
  56.             if find(string,creator) then do
  57.                 creator=subword(string, 3)
  58.                 creator=INSERT('someone in ',creator,0)
  59.                 seek=1
  60.             end
  61.         end
  62.     close('Groups')
  63.     end
  64. end
  65.  
  66. if seek==0 then creator=''
  67. return creator
  68.